home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / terminal / xcomm100a.lha / x-comm / rexx / ExtroLogon.Rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-01-10  |  1.5 KB  |  35 lines

  1. /* Auto Logon for Extro (A Unix Dialup) */
  2.  
  3. /* This is a good example of making X-Comm log onto a BBS */
  4.  
  5. Address "X-Comm"                       /* Tell ARexx you want talk to X-Comm */
  6. options results
  7.  
  8. LOOK1 = "host:"                        /* Setup strings we want to look for */
  9. LOOK2 = "login:"
  10. LOOK3 = "Password:"
  11.  
  12. XString "\n\r"                         /* Pass this string through X-Comm parser */
  13.                                        /* Note use of Auto-Inserts */
  14. XSerialPrint result                    /* Send result to the serial port */
  15.  
  16. XWaitString LOOK1 10                   /* Look for "host:" within 10 second limit */
  17. If result  == LOOK1 then do
  18.         XString "extro\n\r"            /* Parse "extro" through parser */
  19.         XSerialPrint result            /* Send result to the serial port */ 
  20.  
  21.         XWaitString LOOK2 10           /* Look for "login:" within 10 second limit */
  22.         If result == LOOK2 then do
  23.                 XString "username\n\r" /* Parse "username" through parser */
  24.                 XSerialPrint result    /* Send result to serial port */
  25.  
  26.                 XWaitString LOOK3 10   /* Look for "Password:" within 10 second limit */
  27.                 If result == LOOK3 then do
  28.                         XString "password\n\r"  /* Parse "password" through parser */
  29.                         XModemPrint result      /* Send result to serial port */
  30.                 end
  31.         end
  32. end
  33.  
  34. exit                                   /* Exit and tidy up nicely */
  35.